package com.isoft.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Data;
import java.time.LocalDateTime;

@Entity
@Table(name = "flight_info")
@Data
public class FlightInfo {
    @Id
    @Column(name = "flight_id", length = 20)
    private String flightId;

    @Column(name = "flight_number", length = 10, nullable = false)
    private String flightNumber;

    @Column(name = "departure_airport", length = 50, nullable = false)
    private String departureAirport;

    @Column(name = "arrival_airport", length = 50, nullable = false)
    private String arrivalAirport;

    @Column(name = "scheduled_departure", nullable = false)
    private LocalDateTime scheduledDeparture;

    @Column(name = "scheduled_arrival", nullable = false)
    private LocalDateTime scheduledArrival;

    @Column(name = "actual_departure")
    private LocalDateTime actualDeparture;

    @Column(name = "actual_arrival")
    private LocalDateTime actualArrival;

    @Column(name = "status", length = 20, nullable = false)
    private String status; // 如: SCHEDULED, DELAYED, CANCELLED, DEPARTED, ARRIVED

    @Column(name = "aircraft_type", length = 30)
    private String aircraftType;

    @Column(name = "capacity")
    private Integer capacity;
}